package com.yimi.yinhepda.db.dao;

import com.yimi.yinhepda.base.BaseApplication;
import com.yimi.yinhepda.db.helper.DbHelper;
import com.yimi.yinhepda.db.table.UcWaybillRegexTable;

import java.sql.SQLException;
import java.util.List;

/**
 * @author: lj
 * Date: 2020/5/15 9:12
 * Description:快递运单规则表操作类
 */
public class UcWaybillRegexTableDao extends BaseDao<UcWaybillRegexTable, Long> {

    public UcWaybillRegexTableDao() {
        super(DbHelper.getInstance(BaseApplication.getContext()), UcWaybillRegexTable.class);
    }

    public void createOrUpdate(List<UcWaybillRegexTable> list) {
        deleteAll();
        try {
            insert(list);
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
